<?php
include_once("../../Application/User/Conf/config.php");
$urlparts = parse_url(UC_DB_DSN);

$array_data = array(
    'attach' => '1',
    'total_fee' => '1',
    'openid' => 'osJ51uM_2KTe1Kwo5w1tmCf-esio',
    'out_trade_no' => 'wxaa3ddf43e19630ee1436253541',
    'result_code' => 'true',
    'transaction_id' => '1007570075201507070363477003'
);


$mysqli = new mysqli($urlparts['host'],$urlparts['user'],$urlparts['pass'],substr($urlparts['path'],1));

$payid = $array_data['attach'];
$total_fee = $array_data['total_fee'];
$openid = $array_data['openid'];
$out_trade_no = $array_data['out_trade_no'];
$result_code = $array_data['result_code'];
$transaction_id = $array_data['transaction_id'];

$insert = "insert into wp_member_pay_log(payid,total_fee,openid,out_trade_no,result_code,transaction_id,createtime) "
          ." values ('$payid','$total_fee','$openid','$out_trade_no','$result_code','$transaction_id',now()) ";
$mysqli->query($insert);

$mysqli->close();

